Skip to content

Clarify --include-module-folders and document SBOM scans - #463

Merged
lelia merged 10 commits into
mainfrom
docs/include-module-folders-behavior
Nov 24, 2026
Merged

lelia merged 10 commits into
mainfrom
docs/include-module-folders-behavior

Conversation

@dc-larsen

@dc-larsen David Larsen (dc-larsen) commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

--include-module-folders lets Socket discover manifests inside installed module directories. Those manifests describe declared dependencies. To inventory packages present on disk, the troubleshooting guide shows how to generate a CycloneDX SBOM and include it in default-branch and PR scans.

The CLI test checks the submitted manifest list with default settings, with --include-module-folders, with the equivalent --include-dirs list, and with an explicit path exclusion. The help text and docs change only how the behavior is described. The changelog places the update under 2.14.0.

Testing

  • 1,020 tests passed. Ruff and lockfile validation passed.
  • Confirmed that the pinned CycloneDX generator included a package installed by a local fixture's postinstall script that was absent from its lockfile.

Release

Ships in 2.14.0. Merge order: #461 → #462 → #460 → #464 → #465 → #463. Merged together in that order on main at #459, the six pass the full test suite and ruff check. main requires branches to be up to date, so update each PR from main after the previous merge. CHANGELOG.md will conflict each time: combine the bullets under the existing ## 2.14.0 subsections (Upgrade notes, Changed, Fixed, Documentation) by hand rather than taking either side.

This is 6 of 6. Merge it last: it replaces the README's 2.13.0 upgrade guide with one short "Upgrading from 2.12 or earlier" section covering 2.13 and 2.14, which links to workflows and docs added in #460. If a PR is pulled from 2.14.0, trim its part of that section before merging. Updating from main conflicts in docs/ci-cd.md as well as CHANGELOG.md: keep main's paragraph after "Findings block only when a diff comparison runs" and change only the link on its last line to [upgrade notes](../README.md#upgrading-from-212-or-earlier).

Public Changelog

Clarified how --include-module-folders discovers dependency manifests and documented how to scan packages installed outside the lockfile with a CycloneDX SBOM.

Fixes: CE-516
Refs: ASK-639

The help text said "Enabling including module folders like node_modules",
which doesn't say what a scan gains. The flag removes node_modules,
bower_components and jspm_packages from the directories manifest
discovery skips. Every package.json under them is then uploaded as its
own project, and Socket resolves the dependencies each one declares,
devDependencies included. The installed packages themselves are never
recorded, so the flag can add hundreds of packages a project never
installs and still misses a package that a postinstall script put in
node_modules without a lockfile entry.

Say that in the help text and the CLI reference, and add a
troubleshooting entry for packages installed outside the lockfile: a
CycloneDX SBOM of the installed tree saved in the scan root is picked up
by manifest discovery and uploaded with the other manifests.

No behavior change. Bumps the version to 2.13.1 for the version check.
@lelia lelia changed the title Document what --include-module-folders does Document what --include-module-folders does Nov 20, 2026
@lelia lelia self-assigned this Nov 20, 2026
The flag adds every supported manifest under node_modules, bower_components
and jspm_packages, at any depth, not only each package's top-level
package.json. Those files are added to the same scan; no separate project
is created. Say that in the reference, troubleshooting entry and changelog.

Cut the help text to two sentences and point to the troubleshooting
section on GitHub, since pip installs don't include the docs folder.
Document how to include a generated SBOM in pull request comparisons.
Test the manifest list submitted by the CLI under different directory
settings. Group the documentation with the pending 2.14.0 release.
@lelia lelia changed the title Document what --include-module-folders does Clarify --include-module-folders and document SBOM scans Nov 24, 2026
@lelia
lelia marked this pull request as ready for review November 24, 2026 02:54
@lelia
lelia requested a review from a team as a code owner November 24, 2026 02:54
@lelia

lelia commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

bugbot run

@cursor

cursor Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
Documentation, help text, version bump, and regression tests; no manifest-discovery logic changes in this diff.

Overview
Release 2.14.0 bumps the package version and refines how users scan dependencies that never appear in the project lockfile.

--include-module-folders is documented and in --help as discovering supported manifests under node_modules, bower_components, and jspm_packages (equivalent to the matching --include-dirs list), not as a full inventory of installed packages. The CLI reference and a new Packages installed outside the lockfile section in troubleshooting.md explain limitations and recommend generating a CycloneDX SBOM (@cyclonedx/cyclonedx-npm) for npm, including PR/default-branch comparison tips and when to leave the flag off.

A new parametrized unit test drives socketcli end-to-end and asserts which manifest paths are uploaded under default settings, --include-module-folders, the equivalent --include-dirs list, and --exclude-paths overriding node_modules.

Reviewed by Cursor Bugbot for commit e1a8356. Configure here.

@lelia
lelia temporarily deployed to socket-firewall November 24, 2026 02:54 — with GitHub Actions Inactive

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit e1a8356. Configure here.

@lelia
lelia temporarily deployed to socket-firewall November 24, 2026 03:16 — with GitHub Actions Inactive
@lelia
lelia temporarily deployed to socket-firewall November 24, 2026 03:21 — with GitHub Actions Inactive
# Conflicts:
#	CHANGELOG.md
#	docs/ci-cd.md
@lelia
lelia merged commit 4eed245 into main Nov 24, 2026
33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants